package com.foreveross.crawl.vo;

import java.io.Serializable;

/**
 * 元数据结构
 * @author luofangyi
 *
 */
public class MetadataStructure implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2686748535544877777L;
	
	/**
	 * 英文名称
	 */
	private String nameEN;
	/**
	 * 中文名称
	 */
	private String nameCN;
	
	
	public MetadataStructure(String nameEN, String nameCN) {
		this.nameEN = nameEN;
		this.nameCN = nameCN;
	}
	public String getNameEN() {
		return nameEN;
	}
	public void setNameEN(String nameEN) {
		this.nameEN = nameEN;
	}
	public String getNameCN() {
		return nameCN;
	}
	public void setNameCN(String nameCN) {
		this.nameCN = nameCN;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((nameCN == null) ? 0 : nameCN.hashCode());
		result = prime * result + ((nameEN == null) ? 0 : nameEN.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MetadataStructure other = (MetadataStructure) obj;
		if (nameCN == null) {
			if (other.nameCN != null)
				return false;
		} else if (!nameCN.equals(other.nameCN))
			return false;
		if (nameEN == null) {
			if (other.nameEN != null)
				return false;
		} else if (!nameEN.equals(other.nameEN))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "MetadataStructure [nameEN=" + nameEN + ", nameCN=" + nameCN
				+ "]";
	}
}
